﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using HBPVPDruid.Misc;

namespace HBPVPDruid.Spells
{
    public static class Starfall
    {
        public const string SpellName = "Starfall";
        public static readonly int SpellDistance = 40;

        public static bool Pulse()
        {
            // Quick Checks to return false
            if (!SpellManager.CanCast(SpellName)) return false;
            if (ObjectManager.Me.HealthPercent < 60) return false;

            // get count people around me
            if (Misc.Misc.PVPMisc.EnemysAroundMe < 3) return false;
            if (Misc.Misc.PVPMisc.TeamAroundMe < 2) return false;

            Misc.Misc.CastLog(SpellName);
            SpellManager.Cast(SpellName);
            return true;
        }
    }
}
